<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<x:parse xml="${param.xmlstr}" var="xmlData" />
<table class="t_css" width="100%" border="0" cellpadding="0" cellspacing="1" id='cylmzzje'>
<tr>
<td align="right" width="100px"><span class="color_red">*</span>申请资助金额：</td>
<td><input
		type="text" name="budgets/total_funds" id="total_funds" onfocus="InitInput.setNumber(this,7,4,2)"
		label="申请资助资金总额" style="text-align: right;" class="required"
		value="<x:out select="$xmlData/data/budgets/total_funds" />" />万元（备注：详细资金预算及使用计划请后附《联盟活动资金预算表》加以说明。）</td>
</tr>
</table>
<br>
<div class="t_bar">
	<span class="color_red">*</span>产业联盟年度工作计划 （金额单位：万元）
</div>
    
    <table>
    <tr><td colspan='8'>备注：如申请资助项目数量超过8个，可自行加行依次填写；详细内容请后附《联盟年度工作计划》表格加以说明。</td></tr>
    </table>
	<table  id="tblMileStones" cellpadding="0" class="table01" width="100%" border="0" cellpadding="0" style="*border-bottom: #a1c0dc 1px solid;">
			<thead >
					<tr style="border:1px solid #B7D1E6">
						<th class="TblHead" align="center"  width="4%">选择</th>
						<th class="TblHead" align="center"  width="4%">序号</th>
						<th class="TblHead" align="center"  width="16%">具体项目名称</th> 
						<th class="TblHead" align="center"  width="16%">所属产业联盟</th> 
						<th class="TblHead" align="center"  width="30%">项目计划进度</th> 
						<th class="TblHead" align="center"  width="10%">计划投入资金</th> 
						<th class="TblHead" align="center"  width="10%">自筹</th> 
						<th class="TblHead" align="center"  width="10%">资助</th> 
					</tr>
			</thead>
			<tbody id="tab">
					<tr style="display:none">
						<td align="center">&nbsp;
							<input type="radio" class="radiobutton" name="selMileStones" >
						</td>
						<td align="center">&nbsp;
							<span name="milestones|milestone[0]@seq_no" >[index]</span> 
						</td>
						<td>
							<input type="text" name="milestones|milestone[0]|name" label="具体项目名称"  class="required input_text " maxlength="50" style="width:80%"/>
						</td>
						<td>
							<input type="text" name="milestones|milestone[0]|sscylm" label="所属产业联盟"  class="required input_text " maxlength="50" style="width:80%"/>
						</td> 
						<td>
						<textarea name="milestones|milestone[0]|schedule" class="input_textarea required maxlength:100" label="项目计划进度" rows=3 cols=45></textarea>
			            <input type='hidden' name='milestones|milestone[0]|schedule_hidden' id='milestones|milestone[0]|schedule_hidden' value="">
						</td> 
						<td>
							<input type="text" name="milestones|milestone[0]|fund" label="计划投入资金" style="width:80%" onfocus="InitInput.setNumber(this,7,4,2)" onchange="countTable('tblMileStones','jhtr_total_funds',5);" style="text-align:right;" class="required input_text " />
						</td> 
						<td>
							<input type="text" name="milestones|milestone[0]|self_financing" label="自筹" style="width:80%" onfocus="InitInput.setNumber(this,7,4,2)"  onchange="countTable('tblMileStones','zc_total_funds',6);" style="text-align:right;" class="required input_text" />
						</td> 
						<td>
							<input type="text" name="milestones|milestone[0]|subsidize" label="资助"  style="width:80%" onfocus="InitInput.setNumber(this,7,4,2)"  onchange="countTable('tblMileStones','zz_total_funds',7);" style="text-align:right;" class="required input_text " />
						</td> 
					</tr>
					
					<c:set value="0" var="index" scope="page"/>
					<x:forEach select="$xmlData/data/milestones/milestone" var="milestone">
					
					<c:choose>
						<c:when test="${index<10}" ><c:set value="0" var="flag" scope="page"/></c:when>
						<c:otherwise><c:set value="" var="flag" scope="page"/></c:otherwise>
					</c:choose>
					<tr >
						<td align="center">&nbsp;
							<input type="radio" class="radiobutton" name="selMileStones" >
						</td>
						<td align="center">&nbsp;
							<span name="milestones/milestone[${flag}${index}]@seq_no" ><x:out select="$milestone/@seq_no"/></span> 
						</td>
						<td>
							<input type="text" name="milestones/milestone[${flag}${index}]/name" label="具体项目名称"  style="width:80%" required  class="required input_text " value="<x:out select="$milestone/name" />" maxlength="50"/>
						</td>
						<td >
							<input type="text" name="milestones/milestone[${flag}${index}]/sscylm" label="所属产业联盟" style="width:80%" required class="required input_text " value="<x:out select="$milestone/sscylm" />" maxlength="50"/>
						</td> 
						<td >
						<textarea name="milestones/milestone[${flag}${index}]/schedule" class="input_textarea required maxlength:100" label="项目计划进度" rows=3 cols=45 ><x:out select="$milestone/schedule" /></textarea>
			            <input type='hidden' name='milestones/milestone[${flag}${index}]/schedule_hidden' id='milestones/milestone[${flag}${index}]/schedule_hidden' value="">
						</td> 
						<td >
							<input type="text" name="milestones/milestone[${flag}${index}]/fund" label="计划投入资金" style="width:80%" onfocus="InitInput.setNumber(this,7,4,2)"  onchange="countTable('tblMileStones','jhtr_total_funds',5);" style="text-align:right;" required class="required input_text" value="<x:out select="$milestone/fund" />"/>
						</td> 
						<td >
							<input type="text" name="milestones/milestone[${flag}${index}]/self_financing" label="自筹" style="width:80%" onfocus="InitInput.setNumber(this,7,4,2)"  onchange="countTable('tblMileStones','zc_total_funds',6);" style="text-align:right;" required class="required input_text" value="<x:out select="$milestone/self_financing" />"/>
						</td> 
						<td >
							<input type="text" name="milestones/milestone[${flag}${index}]/subsidize" label="资助" style="width:80%" onfocus="InitInput.setNumber(this,7,4,2)"  onchange="countTable('tblMileStones','zz_total_funds',7);" style="text-align:right;" required class="required input_text" value="<x:out select="$milestone/subsidize" />"/>
						</td> 
					</tr>
					<c:set value="${index+1}" var="index" scope="page"/>
					</x:forEach>
					<script type="text/javascript">
						showAllDateTag("tblMileStones");
					</script>
				</tbody>
					</table>
					<table id="tblbinge" cellpadding="0" class="table01" width="100%" border="0" cellpadding="0" style="*border-bottom: #a1c0dc 1px solid;">
					<tr>
					<td width="70%" align="center">合计</td>
					<td width="10%">
			        <input id="jhtr_total_funds" name="budget/jhtr_total_funds" label="计划投入资金合计" type="text"  
					class="input_text required gray"  style="text-align:right;background:#e6e6e6;width:80%" disabled  onfocus="InitInput.setNumber(this,7,4,2)"
					value="<x:out select="$xmlData/data/budget/jhtr_total_funds" />" /> 
		             </td>
		             <td width="10%">
			        <input id="zc_total_funds" name="budget/zc_total_funds" label="自筹合计" type="text"  
					class="input_text required gray"  style="text-align:right;background:#e6e6e6;width:80%" disabled  onfocus="InitInput.setNumber(this,7,4,2)"
					value="<x:out select="$xmlData/data/budget/zc_total_funds" />" /> 
		             </td>
		             <td width="10%">
			        <input id="zz_total_funds" name="budget/zz_total_funds" label="资助合计" type="text"  
					class="input_text required gray"  style="text-align:right;background:#e6e6e6; width:80%" disabled  onfocus="InitInput.setNumber(this,7,4,2)"
					value="<x:out select="$xmlData/data/budget/zz_total_funds" />" /> 
		             </td>
					</tr>
					</table>
					<br>

					<table width="98%" align="center">
					<tr ><td>
					<input class="button" name="cmdAddbefore" type=button value="添加" onclick="if(checkTabLimit('tblMileStones',20,'产业联盟年度工作计划最多只能填写20条')){addNewRow('tblMileStones');showDateTag('tblMileStones');}try{top.resizeFrame();}catch(e){};">
					<input class="button" name="cmdMovePrev" type=button value="上移" onclick="movePrev('tblMileStones','selMileStones')">
					<input class="button" name="cmdMoveNext" type=button value="下移" onclick="moveNext('tblMileStones','selMileStones')">
					<input class="button" name="cmddel" type=button  value="删除" onclick="deleteSelectedRow('tblMileStones','产业联盟年度工作计划');countTable('tblMileStones','jhtr_total_funds',5);countTable('tblMileStones','zc_total_funds',6);countTable('tblMileStones','zz_total_funds',7);">
					</td></tr>
	</table>